package icu.thatyear.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author Cjy
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("tz_order_settlement")
@Schema(name = "TzOrderSettlement", description = "")
public class TzOrderSettlement implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "支付结算单据ID")
    @TableId(value = "settlement_id", type = IdType.AUTO)
    private Long settlementId;

    @Schema(description = "支付单号")
    @TableField("pay_no")
    private String payNo;

    @Schema(description = "外部订单流水号")
    @TableField("biz_pay_no")
    private String bizPayNo;

    @Schema(description = "order表中的订单号")
    @TableField("order_number")
    private String orderNumber;

    @Schema(description = "支付方式 1 微信支付 2 支付宝")
    @TableField("pay_type")
    private Integer payType;

    @Schema(description = "支付方式名称")
    @TableField("pay_type_name")
    private String payTypeName;

    @Schema(description = "支付金额")
    @TableField("pay_amount")
    private BigDecimal payAmount;

    @Schema(description = "是否清算 0:否 1:是")
    @TableField("is_clearing")
    private Integer isClearing;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private String userId;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "清算时间")
    @TableField("clearing_time")
    private LocalDateTime clearingTime;

    @Schema(description = "版本号")
    @TableField("version")
    private Integer version;

    @Schema(description = "支付状态")
    @TableField("pay_status")
    private Integer payStatus;
}
